1. Field of the Invention
This invention relates to compilers, and particularly to systems, methods, and computer products for just-in-time compilation for virtual machine environments for fast applications start-up and maximal run-time performance.
2. Description of Background
Modern virtual machine (VM) environments often employ interpreter and just-in-time (JIT) compiler components, with different policies when the compiler is used versus the interpreter. The interpreter component is typically efficient at running infrequently executed code, because it doesn't introduce initial overhead of transforming the VM intermediate code. However, if the interpreted VM code is executed frequently, it is more efficient to compile the code and run the binary form of the intermediate code. The VM execution environment employs strategies in order to balance the time spent compiling, versus the potential benefit of running faster compiled native code. If the compiler takes more time to optimize the code, the generated code is improved. However, if the compiler takes a long time to optimize the code, it impedes the startup time of the application, because the compilation is occurring at application run-time.
Application startup-time performance is critical in two distinct circumstances: client application software and server middleware application software. With client applications, it is desirable to bring up the application as soon as possible and avoid long pause times to improve user experience. However, the startup performance of application middleware software is important to minimize potential “down-time” of the server, when the application server is restarted. The run-time expectations of client application software and server middleware application software are different. The client application performance does not suffer if the code that it is running isn't optimized at a very high optimization level, since much of the client application components are user interface elements. Furthermore, as long as the user interface performance is “acceptable”, it is not noticeable that the code is faster or slower. However, the throughput performance of the application middleware software is critical, where every percent of performance translates into additional transactions performed per second, that is, more customers are served with the same hardware/software configuration.
Some modern VM environments employ staged compilation to mitigate the problem of balancing the compilation time overhead versus the run-time performance of better optimized code. The JIT compiler initially compiles the code at lower optimization level and then selectively recompiles various “hot” methods. “Hot” means that the method code is executed very frequently or that it takes some significant amount of time from the program execution. Various techniques can be applied to identify the “hot” portions of the code. However, current approaches do not work if the executing program doesn't have distinct “hot” portions of code. Such programs, where every piece of the code is equally important, are said to have a flat execution profile. Typical examples of applications with flat execution profiles are: user interface applications and application middleware software which is by default large, in order to handle various kinds of application structures.
There exists a need for systems and methods to address the performance problems related to code transformation from one representation to another in the context of applications with flat execution profiles.